this._xCaret = 0;
this._yCaret = 0;
- this._pointerIdleMonitor = Meta.IdleMonitor.get_core();
+ this._pointerIdleMonitor = global.backend.get_core_idle_monitor();
this._scrollContentsTimerId = 0;
}
this._userActiveWhileNotificationShown = false;
- this.idleMonitor = Meta.IdleMonitor.get_core();
+ this.idleMonitor = global.backend.get_core_idle_monitor();
this._useLongerNotificationLeftTimeout = false;
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported getPointerWatcher */
-const { GLib, Meta } = imports.gi;
+const { GLib } = imports.gi;
// We stop polling if the user is idle for more than this amount of time
var IDLE_TIME = 1000;
var PointerWatcher = class {
constructor() {
- this._idleMonitor = Meta.IdleMonitor.get_core();
+ this._idleMonitor = global.backend.get_core_idle_monitor();
this._idleMonitor.add_idle_watch(IDLE_TIME, this._onIdleMonitorBecameIdle.bind(this));
this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
this._watches = [];
fadeFactor: 1 });
this._shortLightbox.connect('notify::active', this._onShortLightbox.bind(this));
- this.idleMonitor = Meta.IdleMonitor.get_core();
+ this.idleMonitor = global.backend.get_core_idle_monitor();
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
this._syncInhibitor();
this._powerModeChangedId = this._monitorManager.connect(
'power-save-mode-changed', () => (this._hint.opacity = 0));
- this._idleMonitor = Meta.IdleMonitor.get_core();
+ this._idleMonitor = global.backend.get_core_idle_monitor();
this._idleWatchId = this._idleMonitor.add_idle_watch(HINT_TIMEOUT * 1000, () => {
this._hint.ease({
opacity: 255,
this._otherUserButton);
this.add_child(mainBox);
- this._idleMonitor = Meta.IdleMonitor.get_core();
+ this._idleMonitor = global.backend.get_core_idle_monitor();
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
this.connect('destroy', this._onDestroy.bind(this));